package com.div.toast;

import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.tv_toast).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        showToast();
    }

    private void showToast() {
//        Toast.makeText(this, R.string.toast, Toast.LENGTH_SHORT).show();
        ToastUtils.showShort(this, R.string.toast);
    }
}
